home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Code Resources / Progress CDEFs 1.3 / Read Me < prev   
Encoding:
Text File  |  1994-04-29  |  2.7 KB  |  56 lines  |  [TEXT/ttxt]

  1. Subject: Update: Progress CDEFs 1.3 (CDEF, TC source, test app)
  2. Newsgroups: alt.sources.mac
  3.  
  4. This is an update to my "Progress Bar CDEF" I posted a couple days
  5. ago.  The demo application (included) shows a horizontal progress
  6. bar, a verical progress bar that looks like a thermometer, and a
  7. progress arc, so you can "dare to be different". :-)
  8.  
  9. Attached is a compressed archive which contains the following:
  10.  
  11.  . Progress Bar CDEF v1.3, THINK C source, TC7 project file
  12.  . Progress Arc CDEF v1.3, THINK C source, TC7 project file
  13.  . Demo application, THINK C source, resource file, TC7 project file
  14.  
  15. (If you have an older version of TC, you can create the project files
  16. *easily*. For the demo application, just create a standard project with
  17. MacTraps and Progress Tester.c. For Progress Bar, create a new project,
  18. add MacTraps and Progress Bar CDEF.c, then "Set Project Type..." to 
  19. "Code Resource", name "Progress Bar CDEF", type "CDEF", ID "600", 
  20. Attrs of "20", file type "RSRC" and creator "RSED".  Do the same for
  21. Progress Arc, except change the name to "Progress Arc CDEF" and the
  22. ID to "601".)
  23.  
  24. These CDEFs allow your app to provide a progress indicator by simply
  25. adding a "CNTL" item to any dialog, and then calling SetCtlValue()
  26. from your program.  It has a bonus feature: if the CNTL's variation
  27. code is "1", then the custom colors in the CNTL's corresponding 'cctb'
  28. resource are used to draw the frame/"done"/"to do" areas.  If the
  29. variation code is "0", the standard "Finder progress bar" colors are
  30. used.  (This is described in the source file in a little more detail.)
  31.  
  32. The color progress bars should work just fine on Color QuickDraw Macs
  33. in 1-bit mode.  (See the comments in the source for more details. :-)
  34.  
  35. Changes since the 1.2 release on March 17, 1994:
  36.  
  37. . RGBForeColor/RGBBackColor can move memory; copy colors from the 
  38.   AuxCtlTtable to temporary variables to prevent the overhead of
  39.   HLock/HUnlock.
  40. . A white bar would show up between the "done" and "to do" parts
  41.   if you never called SetCtlValue(); this has been fixed.
  42. . Added code to ensure the control is never outside the specified
  43.   control min/max. This is done automatically by SetCtlValue, but
  44.   it IS possible to set the control value without calling SetCtlValue
  45.   so it was added for robustness.
  46. . Bumped the Progress Arc version up to 1.3 to correspond with the
  47.   Progress Bar version.
  48.  
  49. E-mail comments, suggestions, requests to: egurney@vcd.hp.com
  50.  
  51. --
  52. Eddy J. Gurney N8FPW   Hewlett-Packard Company, Vancouver (USA!) Division
  53. egurney@vcd.hp.com                       #include <standard-disclaimer.h>
  54. "Failures are divided into two classes-- those who thought and never did,
  55.       and those who did and never thought."     John Charles Salak
  56.